package com.zhuidian.mothernote.fragment;

import android.content.Intent;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.base.presenter.BasePresenter;
import com.zhuidian.mothernote.R;
import com.zhuidian.mothernote.activity.InviteAnswerActivity;
import com.zhuidian.mothernote.activity.MessageActivity;
import com.zhuidian.mothernote.activity.NewFansActivity;
import com.zhuidian.mothernote.activity.ReceviceCommentActivity;
import com.zhuidian.mothernote.activity.ReceviceLikeActivity;
import com.zhuidian.mothernote.global.BaseFragment;

public class DiscoverFragment extends BaseFragment {

    private LinearLayout ll_like;
    private LinearLayout ll_reply;
    private LinearLayout ll_invite_answer;
    private LinearLayout ll_new_fans;
    private RelativeLayout rl_study;
    private RelativeLayout rl_mall;
    private RelativeLayout rl_activity;
    private RelativeLayout rl_message;
    private TextView tv_agree_number;
    private TextView tv_comment_num;
    private TextView tv_invite_answer_num;
    private TextView tv_fan_num;


    @Override
    protected int inflateMainLayoutId() {
        return R.layout.fragment_discover;
    }

    @Override
    protected void initView(View view) {
        setTopVisible();
        setTopLeftGone();
        setTopTitle(getResources().getString(R.string.discover));
        ll_like = (LinearLayout) view.findViewById(R.id.ll_like);
        ll_reply = (LinearLayout) view.findViewById(R.id.ll_reply);
        ll_invite_answer = (LinearLayout) view.findViewById(R.id.ll_invite_answer);
        ll_new_fans = (LinearLayout) view.findViewById(R.id.ll_new_fans);
        rl_study = (RelativeLayout) view.findViewById(R.id.rl_study);
        rl_mall = (RelativeLayout) view.findViewById(R.id.rl_mall);
        rl_activity = (RelativeLayout) view.findViewById(R.id.rl_activity);
        rl_message = (RelativeLayout) view.findViewById(R.id.rl_message);
        tv_agree_number = (TextView) view.findViewById(R.id.tv_agree_number);
        tv_comment_num = (TextView) view.findViewById(R.id.tv_comment_num);
        tv_invite_answer_num = (TextView) view.findViewById(R.id.tv_invite_answer_num);
        tv_fan_num = (TextView) view.findViewById(R.id.tv_fan_num);
    }

    @Override
    protected void setListener() {

        ll_like.setOnClickListener(this);
        ll_reply.setOnClickListener(this);
        ll_invite_answer.setOnClickListener(this);
        ll_new_fans.setOnClickListener(this);
        rl_study.setOnClickListener(this);
        rl_mall.setOnClickListener(this);
        rl_activity.setOnClickListener(this);
        rl_message.setOnClickListener(this);
    }

    @Override
    protected void initValue() {

    }

    @Override
    protected BasePresenter getPresenter() {
        return null;
    }

    @Override
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.ll_like:
                context.startActivity(new Intent(context, ReceviceLikeActivity.class));
                break;
            case R.id.ll_reply:
                context.startActivity(new Intent(context, ReceviceCommentActivity.class));
                break;
            case R.id.ll_invite_answer:
                    context.startActivity(new Intent(context, InviteAnswerActivity.class));
                break;
            case R.id.ll_new_fans:
                context.startActivity(new Intent(context, NewFansActivity.class));
                break;
            case R.id.rl_study:

                break;
            case R.id.rl_mall:

                break;
            case R.id.rl_activity:

                break;
            case R.id.rl_message:
                   context.startActivity(new Intent(context, MessageActivity.class));
                break;
        }
    }
}